{extend name="public/base" /}
{block name="style"}
<link rel="stylesheet" href="__THEME__/default/view/admin/static/css/module.css?v={:time_version()}">
{/block}

{block name="content-header"}
<!-- Content Header (Page header) -->
<div class="content-header">
	<div class="container-fluid">
		<div class="row mb-2">
			<div class="col-sm-6">
				<h1 class="m-0 text-dark">
					{$info['id']?'编辑':'新增'}导航
					{notempty name="pid"}
					[&nbsp;父导航：<a href="{:Url('index','pid='.$pid)}">{$parent.title}</a>&nbsp;]
					{/notempty}
				</h1>
			</div><!-- /.col -->
			<div class="col-sm-6">
				<ol class="breadcrumb float-sm-right">
					<li class="breadcrumb-item"><a href="{:Url('index/index')}">首页</a></li>
					<li class="breadcrumb-item"><a href="{:Url('channel/index')}">导航管理</a></li>
					<li class="breadcrumb-item active">编辑导航</li>
				</ol>
			</div><!-- /.col -->
		</div><!-- /.row -->
	</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
{/block}

{block name="content-content"}
<!-- Main content -->
<section class="content">
	<div class="container-fluid">
		<div class="row">
			<div class="col-lg-12">

				<form action="{:Url()}" method="post" class="form-horizontal">
					<input type="hidden" name="pid" value="{$pid}">
					<div class="form-item">
						<label class="item-label">导航标题<span class="check-tips">（用于显示的文字）</span></label>
						<div class="controls">
							<input type="text" class="text input-large" name="title" value="{$info.title|default=''}">
						</div>
					</div>
					<div class="form-item">
						<label class="item-label">导航连接<span class="check-tips">（用于调转的URL，支持带http://的URL或Url函数参数格式）</span></label>
						<div class="controls">
							<input type="text" class="text input-large" name="url" value="{$info.url|default=''}">
						</div>
					</div>
					<div class="form-item">
						<label class="item-label">新窗口打开<span class="check-tips">（是否新窗口打开链接）</span></label>
						<div class="controls">
							<select name="target">
								<option value="0" {eq name="info.target" value="0" }selected{/eq}>否</option>
								<option value="1" {eq name="info.target" value="1" }selected{/eq}>是</option>
							</select>
						</div>
					</div>
					<div class="form-item">
						<label class="item-label">优先级<span class="check-tips">（导航显示顺序）</span></label>
						<div class="controls">
							<input type="text" class="text input-small" name="sort" value="{$info.sort|default='0'}">
						</div>
					</div>
					<div class="form-item">
						<input type="hidden" name="id" value="{$info.id|default=''}">
						<button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
						<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
					</div>
				</form>

			</div>
		</div>
	</div><!-- /.container-fluid -->
</section>
<!-- /.content -->

<!-- Main content -->
<!-- /.content -->
{/block}

{block name='script'}
<script src="__THEME__/default/view/admin/static/js/common.js?v={:time_version()}"></script>
<script type="text/javascript" charset="utf-8">
//导航高亮
highlight_subnav('{:Url('Config/index')}');
</script>
{/block}
